home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_C94E18348F164483BCB73AA76B24D062
< prev
next >
Wrap
Text File
|
2005-03-01
|
578b
|
30 lines
//combine color and texture sample, and clip if alpha from texture isn't near max
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//texture sampler
sampler2D sampTex;
//shader input
struct PS_INPUT
{
float4 Color : COLOR;
float2 Tex0 : TEXCOORD0;
};
//shader code
float4 PShader(PS_INPUT In) : COLOR
{
//sample textutes
float4 texclr=tex2D(sampTex,In.Tex0);
//texkill if alpha from texture isn't near full
clip(texclr.a-0.5f);
//blend with vert color
float4 clr=texclr*In.Color;
//spit out color
return clr;
}